草庐IT

Android - 找不到 SwipeRefreshLayout 导入

全部标签

go - 如何避免 VSCode 在 Golang 中删除未使用的 var 或导入

这个问题在这里已经有了答案:Howtoavoidannoyingerror"declaredandnotused"(8个答案)HowtodisableGolangunusedimporterror(8个答案)关闭3年前。我正在使用最新的VSCode、golang插件和最新的golang版本学习golang。Goland不会让你有未使用的东西-例如变量和导入。VSCode有办法绕过它吗?谢谢你:)

go - 使用括号导入多个包会出错吗?

关闭。这个问题是notreproducibleorwascausedbytypos.它目前不接受答案。这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助future的读者。关闭4年前。Improvethisquestion所以出于某种原因,当我像这样在一行中导入时它工作正常:packagemainimport"fmt"funcmain(){fmt.Println("hi")}但是当我这样做的时候:packagemainimport{"fmt""bufio""os""errors""math"}funcmain(){f

android编程使用Go mobile报错import go.hello.Hello

我对在androidstudio中导入import.hello.Hello时出错有疑问,如下图所示。请给我解决方案如何解决这个错误 最佳答案 请参阅此处@ArpitPatelanswer你需要这样设置路径正如你所说的,你有64位系统,然后复制此路径C:\ProgramFiles\Java\jdk1.8.0_31第1步:-通过单击新建和过去(C:\ProgramFiles\Java\jdk1.8.0_31)此路径创建JAVA_HOME变量。第2步然后单击路径变量并编辑,然后在添加分号(;)C:\ProgramFiles\Java\jd

android - gomobile不能使用java函数吗?

我想获取packagemanager并在gomobile'bind库项目中使用它的功能getPackageInfo()。我怎样才能做到这一点?以下代码无法完全编译,请提供帮助。/Users/*****/go//bin/gomobile:进行构建-pkgdir=/用户/*****/go/pkg/gomobile/pkg_android_386-tags=“”-i-buildmode=c-shared-o=/var/folders/k0/0qkltxj92tx3f8jd8dqdsxp80000gn/T/gomobile-work-351777472/android/src/main/jni

go - 构建时在 golang 中找不到包 "github.com/user../../"

我正在尝试从github源代码构建一个项目。我发现一些源代码导入了如下所示的包:import("os""github.com/bivas/rivi/commands""github.com/mitchellh/cli")但是在构建项目时每次都会报错:user-MacBook-Pro:riviuser$gobuildrivi.gorivi.go:6:2:cannotfindpackage"github.com/bivas/rivi/commands"inanyof:/usr/local/Cellar/go/1.7.5/libexec/src/github.com/bivas/rivi/c

go - travis 找不到我的包 golang

我的结构项目currency-quote-api-||-scraping/file.go|-api/file.go|-tests/test.go|-main.go当我在travisCI中运行测试时,出现以下错误tests/scraping_test.go:4:2:cannotfindpackage"currency-quote-api/scraping"inanyof:/home/travis/.gimme/versions/go1.10.2.linux.amd64/src/currency-quote-api/scraping(from$GOROOT)/home/travis/gop

go - 在导入包时出现此错误知道如何解决这个问题吗?

当我运行以下命令时:gogetgithub.com/docker/go-plugins-helpers/volume它打印:github.com/docker/go-connections/sockets../github.com/docker/go-connections/sockets/sockets.go:35:26:dialer.DialContextundefined(typeproxy.DialerhasnofieldormethodDialContext)../github.com/docker/go-connections/sockets/sockets_unix.go

go - Gopath已在个人资料中设置,但仍看不到Go版本

我已经在我的ubuntu系统上安装了go,在我检查go版本时,我的系统仍然无法识别go。 最佳答案 输入bellow命令,它将刷新配置文件中的路径集。source~/.profile 关于go-Gopath已在个人资料中设置,但仍看不到Go版本,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/56830415/

go - 看不到 struct Golang 的公共(public)函数

我没有看到我定义的结构的公共(public)方法。有人可以让我明白为什么吗?这是代码://DataSaver.go:packageDataStorageimport("fmt""os")typeDataSaverstruct{//doesn'trelevanttomyquestionfileNamestringfile*os.File}funcPrintStr(){fmt.Println("hello")}然后,我在其他类中有一个主要方法。我初始化了结构,我想调用PrintStr()函数。但是,我无法调用此方法。为什么?谢谢! 最佳答案

go - 多语句优于分解导入语句的情况?

关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭3年前。Improvethisquestion"ATourofGo"指南说:Thiscodegroupstheimportsintoaparenthesized,"factored"importstatement.import("fmt""math")Youcanalsowritemultipleimportstatements,like:import"fmt"import"math"Butitisgoodstyletousethef